<?php

	include_once "../../../config.inc.php";
	
	$connection = pg_connect("host=".W." port=".V." dbname=".Z." user=".Y." password=".X) or die ("Falló la conexion");
	 
	$id = $_GET['id'];
	
	  $deleteQuery = "DELETE FROM ELEMENT_TEXT WHERE SEC_ID = ".$id.";";
						    $delete = pg_query($connection,$deleteQuery);			
							
	  $deleteQuery = "DELETE FROM MENU_ELEMENT WHERE SEC_ID = ".$id.";";
						    $delete = pg_query($connection,$deleteQuery);
							
							$deleteQuery = "DELETE FROM MENU_LIST WHERE SEC_ID = ".$id.";";
						    $delete = pg_query($connection,$deleteQuery);			
		
							
	  $deleteQuery = "DELETE FROM IMAGE_ELEMENT WHERE SEC_ID = ".$id.";";
						    $delete = pg_query($connection,$deleteQuery);
							
							$deleteQuery = "DELETE FROM GALLERY_ELEMENT WHERE SEC_ID = ".$id.";";
						    $delete = pg_query($connection,$deleteQuery);
		
	  $deleteQuery = "DELETE FROM SECTIONS WHERE SEC_ID = ".$id.";";
						    $delete = pg_query($connection,$deleteQuery);	

?>